<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArSpeechSynth Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArSpeechSynth.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArSpeechSynth-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArSpeechSynth Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Abstract interface to speech synthesis.  
 <a href="classArSpeechSynth.html#details">More...</a></p>

<p><code>#include &lt;ArSpeech.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a7f7baab482ce65022051da4b88e4f6f2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7f7baab482ce65022051da4b88e4f6f2"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#a7f7baab482ce65022051da4b88e4f6f2">addToConfig</a> (<a class="el" href="classArConfig.html">ArConfig</a> *config)</td></tr>
<tr class="memdesc:a7f7baab482ce65022051da4b88e4f6f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use the given <a class="el" href="classArConfig.html" title="Stores configuration information which may be read to and from files or other sources. ">ArConfig</a> object to read parameters such as voice, speaking rate, volume. <br /></td></tr>
<tr class="separator:a7f7baab482ce65022051da4b88e4f6f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed33372eb96b4daefc9fb8064a2c64ff"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#aed33372eb96b4daefc9fb8064a2c64ff">ArSpeechSynth</a> ()</td></tr>
<tr class="memdesc:aed33372eb96b4daefc9fb8064a2c64ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Don't forget to call this from derived classes.  <a href="#aed33372eb96b4daefc9fb8064a2c64ff">More...</a><br /></td></tr>
<tr class="separator:aed33372eb96b4daefc9fb8064a2c64ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc90ac303f0610847ea4833ef7448afe"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acc90ac303f0610847ea4833ef7448afe"></a>
virtual int&#160;</td><td class="memItemRight" valign="bottom"><b>getAudioSampleRate</b> ()=0</td></tr>
<tr class="separator:acc90ac303f0610847ea4833ef7448afe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6487e0f0b83bff63657dd27f78cf327a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6487e0f0b83bff63657dd27f78cf327a"></a>
virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#a6487e0f0b83bff63657dd27f78cf327a">getCurrentVoiceName</a> ()=0</td></tr>
<tr class="memdesc:a6487e0f0b83bff63657dd27f78cf327a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get name of current voice, if set with setVoice (else returns NULL) <br /></td></tr>
<tr class="separator:a6487e0f0b83bff63657dd27f78cf327a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae2efd012ea48f69dcaf480a9c30cb47"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classArRetFunctorC.html">ArRetFunctorC</a>&lt; bool, <a class="el" href="classArSpeechSynth.html">ArSpeechSynth</a> &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#aae2efd012ea48f69dcaf480a9c30cb47">getInitCallback</a> ()</td></tr>
<tr class="separator:aae2efd012ea48f69dcaf480a9c30cb47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2dddb561421b485f6ed7d8911160d5c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classArFunctorC.html">ArFunctorC</a>&lt; <a class="el" href="classArSpeechSynth.html">ArSpeechSynth</a> &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#ae2dddb561421b485f6ed7d8911160d5c">getInterruptCallback</a> ()</td></tr>
<tr class="separator:ae2dddb561421b485f6ed7d8911160d5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a764feabb69b72872d9ccddfa4e29b8f3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classArRetFunctor2C.html">ArRetFunctor2C</a>&lt; bool, <a class="el" href="classArSpeechSynth.html">ArSpeechSynth</a>, const char *, const char * &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#a764feabb69b72872d9ccddfa4e29b8f3">getSpeakCallback</a> (void)</td></tr>
<tr class="separator:a764feabb69b72872d9ccddfa4e29b8f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4ebae5c9311f381ea502e0b905083ce"><td class="memItemLeft" align="right" valign="top">virtual std::list&lt; std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#af4ebae5c9311f381ea502e0b905083ce">getVoiceNames</a> ()=0</td></tr>
<tr class="memdesc:af4ebae5c9311f381ea502e0b905083ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a list of available voice names, if possible.  <a href="#af4ebae5c9311f381ea502e0b905083ce">More...</a><br /></td></tr>
<tr class="separator:af4ebae5c9311f381ea502e0b905083ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f9e63166563304cb4915c9a2b8830ac"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#a4f9e63166563304cb4915c9a2b8830ac">init</a> ()</td></tr>
<tr class="memdesc:a4f9e63166563304cb4915c9a2b8830ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform synthesizer initialization, if necessary.  <a href="#a4f9e63166563304cb4915c9a2b8830ac">More...</a><br /></td></tr>
<tr class="separator:a4f9e63166563304cb4915c9a2b8830ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca546b1f881d1ad49a96a5d0a2bd2257"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aca546b1f881d1ad49a96a5d0a2bd2257"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#aca546b1f881d1ad49a96a5d0a2bd2257">interrupt</a> ()=0</td></tr>
<tr class="memdesc:aca546b1f881d1ad49a96a5d0a2bd2257"><td class="mdescLeft">&#160;</td><td class="mdescRight">If any speech is currently ongoing, interrupt it. <br /></td></tr>
<tr class="separator:aca546b1f881d1ad49a96a5d0a2bd2257"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a613666ee480d0e5a32289cbb44df7a64"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a613666ee480d0e5a32289cbb44df7a64"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#a613666ee480d0e5a32289cbb44df7a64">lock</a> ()</td></tr>
<tr class="memdesc:a613666ee480d0e5a32289cbb44df7a64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lock, if neccesary. <br /></td></tr>
<tr class="separator:a613666ee480d0e5a32289cbb44df7a64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26649f34e057c649a414ab9290e57981"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#a26649f34e057c649a414ab9290e57981">setAudioCallback</a> (<a class="el" href="classArRetFunctor2.html">ArRetFunctor2</a>&lt; bool, <a class="el" href="classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a> *, int &gt; *cb)</td></tr>
<tr class="memdesc:a26649f34e057c649a414ab9290e57981"><td class="mdescLeft">&#160;</td><td class="mdescRight">Instead of playing synthesized audio using the synthesizer's internal audio playback, call the given callback when a chunk of audio has been synthesized.  <a href="#a26649f34e057c649a414ab9290e57981">More...</a><br /></td></tr>
<tr class="separator:a26649f34e057c649a414ab9290e57981"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66243ab7410be9951195931b1f6e2c20"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#a66243ab7410be9951195931b1f6e2c20">setAudioSampleRate</a> (int rate)=0</td></tr>
<tr class="memdesc:a66243ab7410be9951195931b1f6e2c20"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change audio sample rate (Hz).  <a href="#a66243ab7410be9951195931b1f6e2c20">More...</a><br /></td></tr>
<tr class="separator:a66243ab7410be9951195931b1f6e2c20"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a915b0cb3d5a5bc2de3e249b942d128d1"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#a915b0cb3d5a5bc2de3e249b942d128d1">setVoice</a> (const char *name)=0</td></tr>
<tr class="memdesc:a915b0cb3d5a5bc2de3e249b942d128d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the current voice by name.  <a href="#a915b0cb3d5a5bc2de3e249b942d128d1">More...</a><br /></td></tr>
<tr class="separator:a915b0cb3d5a5bc2de3e249b942d128d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fd8878d738fac357e87f286e6484732"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#a9fd8878d738fac357e87f286e6484732">speak</a> (const char *str, const char *voiceParams, <a class="el" href="classArRetFunctor2.html">ArRetFunctor2</a>&lt; bool, <a class="el" href="classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a> *, int &gt; *audioOutputCB, unsigned short sampleRate=0)=0</td></tr>
<tr class="memdesc:a9fd8878d738fac357e87f286e6484732"><td class="mdescLeft">&#160;</td><td class="mdescRight">Speaks the given text.  <a href="#a9fd8878d738fac357e87f286e6484732">More...</a><br /></td></tr>
<tr class="separator:a9fd8878d738fac357e87f286e6484732"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9e0329b3f8b43fc96ad6be38dc880b0"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#ac9e0329b3f8b43fc96ad6be38dc880b0">speak</a> (const char *str, const char *voiceParams=NULL)</td></tr>
<tr class="memdesc:ac9e0329b3f8b43fc96ad6be38dc880b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Speaks the given text.  <a href="#ac9e0329b3f8b43fc96ad6be38dc880b0">More...</a><br /></td></tr>
<tr class="separator:ac9e0329b3f8b43fc96ad6be38dc880b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af17a40849de4d8a9a6c70687cc7388f4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af17a40849de4d8a9a6c70687cc7388f4"></a>
virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#af17a40849de4d8a9a6c70687cc7388f4">speakf</a> (const char *fmt,...)=0</td></tr>
<tr class="memdesc:af17a40849de4d8a9a6c70687cc7388f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Speaks the given string, using current voice and output settings, taking varargs and a format string (like printf) <br /></td></tr>
<tr class="separator:af17a40849de4d8a9a6c70687cc7388f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae72f5aa9cf0a46d133ff1bd195e058b5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae72f5aa9cf0a46d133ff1bd195e058b5"></a>
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#ae72f5aa9cf0a46d133ff1bd195e058b5">unlock</a> ()</td></tr>
<tr class="memdesc:ae72f5aa9cf0a46d133ff1bd195e058b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unlock, if neccesary. <br /></td></tr>
<tr class="separator:ae72f5aa9cf0a46d133ff1bd195e058b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a1037bdf94b4d8f0f25cdd25b8e586499"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1037bdf94b4d8f0f25cdd25b8e586499"></a>
<a class="el" href="classArRetFunctor2.html">ArRetFunctor2</a>&lt; bool, <a class="el" href="classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a> *, int &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArSpeechSynth.html#a1037bdf94b4d8f0f25cdd25b8e586499">myAudioPlaybackCB</a></td></tr>
<tr class="memdesc:a1037bdf94b4d8f0f25cdd25b8e586499"><td class="mdescLeft">&#160;</td><td class="mdescRight">If set, send audio to this callback instead of playing it directly. <br /></td></tr>
<tr class="separator:a1037bdf94b4d8f0f25cdd25b8e586499"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ebb4676971cd79042f464c71b3b5679"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1ebb4676971cd79042f464c71b3b5679"></a>
<a class="el" href="classArRetFunctorC.html">ArRetFunctorC</a>&lt; bool, <a class="el" href="classArSpeechSynth.html">ArSpeechSynth</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myInitCB</b></td></tr>
<tr class="separator:a1ebb4676971cd79042f464c71b3b5679"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e3b0aec2936512d5a6a8deae56a3646"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4e3b0aec2936512d5a6a8deae56a3646"></a>
<a class="el" href="classArFunctorC.html">ArFunctorC</a>&lt; <a class="el" href="classArSpeechSynth.html">ArSpeechSynth</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>myInterruptCB</b></td></tr>
<tr class="separator:a4e3b0aec2936512d5a6a8deae56a3646"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d0480fd25e3c2bafce9e98a6162752e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1d0480fd25e3c2bafce9e98a6162752e"></a>
<a class="el" href="classArRetFunctor2C.html">ArRetFunctor2C</a>&lt; bool, <a class="el" href="classArSpeechSynth.html">ArSpeechSynth</a>, const char *, const char * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>mySpeakCB</b></td></tr>
<tr class="separator:a1d0480fd25e3c2bafce9e98a6162752e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Abstract interface to speech synthesis. </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000070">Deprecated:</a></b></dt><dd></dd></dl>
<p>This class defines the abstract interface for speech synthesizers used with <a class="el" href="classAria.html" title="Contains global initialization, deinitialization and other global functions. ">Aria</a>. Implementations are provided in the separate ArSpeechSynth_Cepstral and ArSpeechSynth_Festival libraries. This class provides a common-denominator interface. Implementations (especially ArCepstral) may support more features, or behave differently; refer to their documentation for more information.</p>
<p>This class registers one parameter with the global <a class="el" href="classArConfig.html" title="Stores configuration information which may be read to and from files or other sources. ">ArConfig</a> object in the "Speech Synthesis" section: The parameter is named "voice" and sets the voice used for speech synthesis, if multiple voices is supported and the new voice can be loaded. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aed33372eb96b4daefc9fb8064a2c64ff"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArSpeechSynth::ArSpeechSynth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Don't forget to call this from derived classes. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aae2efd012ea48f69dcaf480a9c30cb47"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArRetFunctorC.html">ArRetFunctorC</a>&lt; bool, <a class="el" href="classArSpeechSynth.html">ArSpeechSynth</a> &gt; * ArSpeechSynth::getInitCallback </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>a functor for <a class="el" href="classArSpeechSynth.html#a4f9e63166563304cb4915c9a2b8830ac" title="Perform synthesizer initialization, if necessary. ">init()</a> to use with <a class="el" href="classArSoundsQueue.html" title="This class manages a queue of items to play as WAV files or as text to speak using a speech synthesiz...">ArSoundsQueue</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ae2dddb561421b485f6ed7d8911160d5c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArFunctorC.html">ArFunctorC</a>&lt; <a class="el" href="classArSpeechSynth.html">ArSpeechSynth</a> &gt; * ArSpeechSynth::getInterruptCallback </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>a functor for <a class="el" href="classArSpeechSynth.html#aca546b1f881d1ad49a96a5d0a2bd2257" title="If any speech is currently ongoing, interrupt it. ">interrupt()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a764feabb69b72872d9ccddfa4e29b8f3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classArRetFunctor2C.html">ArRetFunctor2C</a>&lt; bool, <a class="el" href="classArSpeechSynth.html">ArSpeechSynth</a>, const char *, const char * &gt; * ArSpeechSynth::getSpeakCallback </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>a functor for <a class="el" href="classArSpeechSynth.html#a9fd8878d738fac357e87f286e6484732" title="Speaks the given text. ">speak()</a> to use with <a class="el" href="classArSoundsQueue.html" title="This class manages a queue of items to play as WAV files or as text to speak using a speech synthesiz...">ArSoundsQueue</a> </dd></dl>

</div>
</div>
<a class="anchor" id="af4ebae5c9311f381ea502e0b905083ce"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::list&lt;std::string&gt; ArSpeechSynth::getVoiceNames </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return a list of available voice names, if possible. </p>

</div>
</div>
<a class="anchor" id="a4f9e63166563304cb4915c9a2b8830ac"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSpeechSynth::init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Perform synthesizer initialization, if necessary. </p>
<p>You must call this method.</p>
<p>(Subclass implementations should call this method <em>after</em> initializing their speech engine.) </p>

</div>
</div>
<a class="anchor" id="a26649f34e057c649a414ab9290e57981"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArSpeechSynth::setAudioCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArRetFunctor2.html">ArRetFunctor2</a>&lt; bool, <a class="el" href="classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a> *, int &gt; *&#160;</td>
          <td class="paramname"><em>cb</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Instead of playing synthesized audio using the synthesizer's internal audio playback, call the given callback when a chunk of audio has been synthesized. </p>
<p>Audio is passed to the callback in the first parameter as signed 16-bit samples (PCM16). The sample rate is 16kHz but may be changed with <a class="el" href="classArSpeechSynth.html#a66243ab7410be9951195931b1f6e2c20" title="Change audio sample rate (Hz). ">setAudioSampleRate()</a>. The second parameter is the number of samples. The return value from the callback is ignored. </p>

</div>
</div>
<a class="anchor" id="a66243ab7410be9951195931b1f6e2c20"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void ArSpeechSynth::setAudioSampleRate </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rate</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Change audio sample rate (Hz). </p>
<p>Normal rate is 16000 Hz. Suggested values are 8000, 16000, or 44400 </p>

</div>
</div>
<a class="anchor" id="a915b0cb3d5a5bc2de3e249b942d128d1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool ArSpeechSynth::setVoice </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the current voice by name. </p>
<p>Replaces fully any previous required voice criteria. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classArSpeechSynth.html#af4ebae5c9311f381ea502e0b905083ce" title="Return a list of available voice names, if possible. ">getVoiceNames</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a9fd8878d738fac357e87f286e6484732"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool ArSpeechSynth::speak </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>voiceParams</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classArRetFunctor2.html">ArRetFunctor2</a>&lt; bool, <a class="el" href="classArTypes.html#aff7daca3c28eeaacc95b1ac07997661c">ArTypes::Byte2</a> *, int &gt; *&#160;</td>
          <td class="paramname"><em>audioOutputCB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned short&#160;</td>
          <td class="paramname"><em>sampleRate</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Speaks the given text. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>The text to speak. </td></tr>
    <tr><td class="paramname">voiceParams</td><td>Voice selection criteria expression (implementation-specific) </td></tr>
    <tr><td class="paramname">audioOutputCB</td><td>If not NULL, send synthesized audio data to this callback (may be called several times). Otherwise, play using default AudioCallback, or directly out the speakers </td></tr>
    <tr><td class="paramname">sampleRate</td><td>if given, temporarily use this sample rate for this speech, then restore. If 0, use current sample rate. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac9e0329b3f8b43fc96ad6be38dc880b0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool ArSpeechSynth::speak </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>voiceParams</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Speaks the given text. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">str</td><td>The text to speak. </td></tr>
    <tr><td class="paramname">voiceParams</td><td>Voice selection criteria expression (implementation-specific) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArSpeech.h</li>
<li>ArSpeech.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArSpeechSynth.html">ArSpeechSynth</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
